home *** CD-ROM | disk | FTP | other *** search
- Short: Replace strings in files (CLI-Pure)
- Author: dck@prometheus.hol.gr (D. Keletsekis)
- Uploader: dck@prometheus.hol.gr (D. Keletsekis)
- Version: 1.3
- Type: util/cli
- Requires: WB 2+
-
- REP is a small, fast CLI command for replacing strings in files.
- It is pure and can be made resident.
-
- This version adds the ability to define HEX and non-printable
- characters in the string (read on..)
-
- Usage :
- -------------
- > Rep FromFile/A, String/A, ToString/A, ToFile, I=Insensitive/S
-
- Where :
- -------------
- FromFile - is the file you want to convert.
- String - The string you want to replace
- ToString - What you want to replace it with
- ToFile - (Optional) the name of the output file. If this is
- not given, then the INPUT FILE WILL BE OVERWRITEN!
- Insensitive - (Optional) Make the search case-insensitive
-
- Example :
- --------------
- rep df0:MyFile ThisString ThatString Insensitive
- - will replace all occurences of "ThisString" (or THISstring, or
- ThIsStRiNg etc) with "ThatString" and save it over the original
- file.
-
- "String" and "ToString" are parsed and may contain HEX, DECIMAL
- and other non-printable characters. The way to do this is:
-
- The "\" character starts a character specification :
-
- \n - is the Newline character (decimal 10)
- \r - is the carriage return
- \t - is the TAB character
- \\ - is the \ character itself
- \" - is the " character
- \' - is the ' character
-
- \x - starts a HEX character string, defined by pairs
- of HEX digits (0-9,A-F) until another \ character
- or the end of the string are encountered.
- ex: MyString\x000003F3\continues
-
- \# - starts a DECIMAL character, defined by a number
- from 0-255. Again, the number ends with another
- \ character or the end of the string.
- ex: "\#155\32mWhite text"
-
- Any other character will be considered literally, i.e.
- \c - is the "c" character.
-
- There is also a GUI script included, which makes this litle
- command very powerful & easy to use if you want to make the
- same replacements in a lot of files. A preview is included.
-
- The GUI needs a program called Gui4Cli (also written by yours
- truly and what a great program it is too :), available at :
-
- 1.- http://users.hol.gr/~dck/gcmain.htm
- 2.- Aminet, under Dev/Gui/Gui4Cli.lha
-
- D. Keletsekis - dck@prometheus.hol.gr
- Novemeber 1997
-
- This program is FreeWare, but remains the Copyright of D.Keletsekis.
- No guarantees as to it's performance and actions is made or implied.
- Use it at your own risk.
-
-
- ============================= Archive contents =============================
-
- Original Packed Ratio Date Time Name
- -------- ------- ----- --------- -------- -------------
- 628 267 57.4% 03-Oct-97 21:32:34 REP.info
- 1472 1105 24.9% 03-Oct-97 21:32:44 +Rep
- 6056 2009 66.8% 03-Oct-97 21:35:10 +Rep.gc
- 590 192 67.4% 03-Oct-97 21:35:10 +Rep.gc.info
- 2594 1262 51.3% 03-Oct-97 21:34:20 +Rep.readme
- 14870 3877 73.9% 03-Oct-97 21:34:38 +RepGrab.iff
- -------- ------- ----- --------- --------
- 26210 8712 66.7% 11-Nov-97 22:44:24 6 files
-